package com.soft.javase.day07;

import java.util.Scanner;

/**
 * @author yzg
 * @desc TODO
 * @date 2025/4/26
 */
public class ExceptionTest {
    public static void main(String[] args) {
        System.out.println("请输入一个数字a：");
        int a = new Scanner(System.in).nextInt();
        System.out.println("请输入一个数字b：");
        int b = new Scanner(System.in).nextInt();

        try {
            int c = a/b;
            System.out.println(c);
        }catch (ArithmeticException e) {
            e.printStackTrace();
        }
    }
}
